package com.jarvan.exception;

import com.jarvan.enums.ResultEnum;
import lombok.Getter;

@Getter
public class TrainException extends RuntimeException{
    /**
     *
     */
    private static final long serialVersionUID = -8396904531886045703L;
    private Integer code;

    public TrainException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public TrainException(Integer code, String message){
        super(message);
        this.code = code;
    }
}
